//
//  GWPurchaseViewController.m
//  GiftWanted
//
//  Created by lanou on 15/11/9.
//  Copyright © 2015年 陈文杰. All rights reserved.
//

#import "GWPurchaseViewController.h"

@interface GWPurchaseViewController ()

@property (nonatomic, strong) UIWebView *webView;

@end

@implementation GWPurchaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.leftButton setBackgroundImage:[UIImage imageNamed:@"cancle"] forState:(UIControlStateNormal)];
    [self.leftButton addTarget:self action:@selector(handleCancleButtonAction) forControlEvents:(UIControlEventTouchUpInside)];
    self.titleLabel.text = @"商品";
    
    _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 70, SCREEN_WIDTH, SCREEN_HEIGHT-70)];
    [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.purchase_url]]];
    [self.view addSubview:_webView];
}

- (void)handleCancleButtonAction {
    
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
